package com.smooth.mall.request;


import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

    /*
    *描述：前端目录修改请求数据实体类，单一职责原则
    */
public class UpdateCategoryReq {
    @NotNull(message = "id不能为空")
    private Integer id;

    @Size(min=2,max=5)//代表此字段入参不能小于2个字，不能大于5个字
    private String name;

    @Max(3)//代表type的最大值为3
    private Integer type;
    private Integer parentId;
    private Integer orderNum;

        public Integer getId() {
            return id;
        }

        public void setId(Integer id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public Integer getType() {
            return type;
        }

        public void setType(Integer type) {
            this.type = type;
        }

        public Integer getParentId() {
            return parentId;
        }

        public void setParentId(Integer parentId) {
            this.parentId = parentId;
        }

        public Integer getOrderNum() {
            return orderNum;
        }

        public void setOrderNum(Integer orderNum) {
            this.orderNum = orderNum;
        }
    }

